#include <fstream>
#include <iostream>
#include <string>
using namespace std;

#define MAX_SIZE 20

int main()
{
    ifstream inputStream;
    inputStream.open("text.txt");

    int number[MAX_SIZE], signal, i = 0;
    while (inputStream >> signal)
        number[i++] = signal;

    while (--i >= 0)
        cout << number[i] << " ";
    cout << endl;

    inputStream.close();

    return 0;
}